//
//  MFWDownloadTask.h
//  download
//
//  Created by 陈曦 on 13-4-24.
//  Copyright (c) 2013年 陈曦. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MFWDownloadItem.h"



@class MFWDownloadTask;
@protocol MFWDownloadTaskDelegate <NSObject>

- (void)MFWDownloadTaskFinished:(MFWDownloadTask*)aTask;
- (void)MFWDownloadTaskFailed:(MFWDownloadTask *)aTask;

@end

@interface MFWDownloadTask : NSObject

@property (nonatomic, assign)   id<MFWDownloadTaskDelegate> delegate;

@property (nonatomic, retain)   MFWDownloadItem *item;
@property (nonatomic, readonly) unsigned long long totalLength;
@property (nonatomic, readonly) unsigned long long downloadLength;

- (id)initWithItem:(MFWDownloadItem*)aItem;

- (void)start;
- (void)stop;

- (void)clear;

@end
